package streamAPI;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;


public class 创建stream2_2 {
	public static void main(String[] args) {
		List<String> list=new ArrayList<>();;
		Stream<List<String>> of = Stream.of(list);
//		Stream.of("1","2","3");方法接受任意长度的数组
		Stream<Object> empty = Stream.empty();//不含任何元素的steam
		Stream<String> echos=Stream.generate(()->"Echo");//含有常量值的tream
		Stream<Double> randoms=Stream.generate(Math::random);//含有随机数字的Stream
		Stream<BigInteger> integers=Stream.iterate(BigInteger.ZERO, n->n.add(BigInteger.ONE));//一个0 1 2 3 ..的无限序列
//		Stream<String> words=Pattern.compile("[\\P{L}]+").splitAsStream(CharArrayIntMap);
	}
}
